home *** CD-ROM | disk | FTP | other *** search
- /********************************************************************************
- Copyright © N. Jonas Englund, 1993. All Rights Reserved.
- ********************************************************************************
-
- PROJECT: clut_fade.π
-
- FILE: shell.c
-
- PURPOSE: 'clut' fading functions
-
- ********************************************************************************/
-
- //================================= INCLUDES ====================================
-
- #include "shell.h"
- #include "fade.h"
-
- //================================= FUNCTIONS ===================================
-
- void init_toolbox(void);
- void test_window(void);
-
- /*********************************** main ***************************************/
- extern
- void main(void)
- {
- init_toolbox();
- test_window();
- }
- /*** main ***/
-
- /********************************** init_toolbox ********************************/
- static
- void init_toolbox(void)
- {
- MaxApplZone();
- MoreMasters();
- InitGraf(&thePort);
- InitFonts();
- InitWindows();
- InitMenus();
- TEInit();
- InitDialogs(nil);
- InitCursor();
- FlushEvents(everyEvent, 0);
- }
- /*** init_toolbox ***/
-
- /********************************** test_window *********************************/
- static
- void test_window(void)
- {
- DialogPtr d;
- GrafPtr g;
- short hit;
- GDHandle hGD;
- CTabHandle hCTab;
- long ticks;
-
- if (d = GetNewDialog(128, nil, (WindowPtr) -1L))
- {
- GetPort(&g);
- SetPort(d);
- ShowWindow(d);
-
- do
- {
- ModalDialog(nil, &hit);
- switch (hit)
- {
- case 2:
- fade_screen(128, true); //• Try fade speeds from
- Delay (120L, &ticks);
- fade_screen(200, false); //• 1 upward.
- break;
- }
- }
- while (hit != OK);
-
- SetPort(g);
- DisposDialog(d);
- }
- }
- /*** test_window ***/
-
- //===================================== EOF =====================================